<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@include file="/WEB-INF/common/topBegin.jsp"%>
 
<%@include file="/WEB-INF/common/topEnd.jsp"%>	
<%@include file="/WEB-INF/common/bodyBegin.jsp"%>
<script>
var companyId="${entity.company.id}";
var type="${entity.type}";
var tbarOpr = [],queryRole=false,editRole=false;
<c:if test="${my:hasPermission(currentUser.id,'shipOrder','CREATE')}">
tbarOpr.push({
	text : '新增',
	iconCls : 'page_addIcon',
	handler : function() {
		listView.addInit(false);
	}
});

tbarOpr.push({
	text : '新增2',
	iconCls : 'page_addIcon',
	handler : function() {
		listView.addInit(true);//通过手动添加框的方式来新增数据
	}
});
tbarOpr.push('-');
</c:if>

<c:if test="${my:hasPermission(currentUser.id,'shipOrder','UPDATE')}">
	editRole=true;
	tbarOpr.push({
		text : '修改',
		iconCls : 'page_edit_1Icon',
		handler : function() {
			listView.editInit();
		}
	});
	tbarOpr.push('-');
	tbarOpr.push({
		text : '查看',
		iconCls : 'previewIcon',
		handler : function() {
			listView.show();
		}
	});
</c:if>
<c:if test="${my:hasPermission(currentUser.id,'shipOrder','DELETE')}">
	tbarOpr.push({
		text : '删除',
		iconCls : 'page_delIcon',
		handler : function() {
			listView.deleteItem();
		}
	});
	tbarOpr.push('-');
</c:if>
tbarOpr.push({
	text : '承运方打印',
	iconCls : 'printerIcon',
	handler : function() {
		listView.printCarrier();
	}
});
tbarOpr.push({
	text : '托运方打印',
	iconCls : 'printerIcon',
	handler : function() {
		listView.printShipper();
	}
});
tbarOpr.push({
	text : '收货方打印',
	iconCls : 'printerIcon',
	handler : function() {
		listView.printReceiver();
	}
});

tbarOpr.push('-');
<c:if test="${my:hasPermission(currentUser.id,'shipOrder','READ')}">
	queryRole=true;
</c:if>
var companyId="${currentUser.person.companyId}";
</script>
<script type="text/javascript" src="${ctx}/js/extjs/ux/Ext.ux.grid.RowActions.js"></script>
<script type="text/javascript" src="${ctx}/js/extjs/ux/ResetDateField.js"></script>
<script type="text/javascript" src="${ctx}/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="${ctx}/js/app-web/biz/shipOrder/shipOrderView.js"></script>

<%@include file="/WEB-INF/common/bodyEnd.jsp"%>	
